package com.rgzn.fzxj;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
import org.springframework.web.client.RestTemplate;

@SpringBootApplication
public class FzxjApplication {

    public static void main(String[] args) {
        System.setProperty("ffmpeg.home","");
        SpringApplication.run(FzxjApplication.class, args);
    }

    @Bean
    public RestTemplate restTemplate() {
        RestTemplate restTemplate = new RestTemplate();
//        // 设置连接超时和读取超时（可选）
//        HttpComponentsClientHttpRequestFactory requestFactory = new HttpComponentsClientHttpRequestFactory();
//        // 连接超时5秒
//        requestFactory.setConnectTimeout(5000);
//        restTemplate.setRequestFactory(requestFactory);
        return restTemplate;
    }

}
